import time
from dbshop1.public.action import *
from dbshop1.public.business import *
from dbshop1.public.testData import *
from dbshop1.public.tools import*
testCase="DBshop015_添加侧边"
#打开网页并实例化
llq=openBrowser(urlAdmin)
#登入后台页面
DBshopLoginAdmin(llq)
#进入前台侧边设置页面
DBshopEnterMenu3(llq,"商品管理","管理分类","前台侧边设置")
#进入添加侧边页面
llq.find_element_by_xpath('//a[@href="/dbshop/admin/goods/class/addFrontSide"]').click()
llq.find_element_by_id("frontside_name").send_keys("网站很好看")
llq.find_element_by_xpath('//button[@class="btn btn-small btn-primary"]').click()
#断言
try:
    llq.find_element_by_xpath('//td[contains(.,"网站很好看")]')
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(llq)
llq.quit()